i=1
id=$(pidof signal)
while [ $i -le 10 ]
do
    if [ $i -le 5 ]
    then
        echo "kill -2 $id"
        kill -2 $id
        let i++
    else
        echo "kill -40 $id"
        kill -40 $id
        let i++
    fi
done